import { request } from "../utils/axiosconfig";

/**
 * 分类列表
 */
export function goodsTypeList(params = {}) { //商品列表
    return request({
        url: 'api/admin/goodsTypeList',
        method: 'POST',
        data: params
    })
}

export function addGoodType(params = {}) { //商品列表添加
    return request({
        url: 'api/admin/addGoodType',
        method: 'POST',
        data: params
    })
}

export function deleteGoodtype(params = {}) { //删除商品分类
    return request({
        url: 'api/admin/deleteGoodtype',
        method: 'POST',
        data: params
    })
}

export function goodList(params) { //商品列表
    return request({
        url: 'api/admin/goodList',
        method: 'POST',
        data: params
    })
}

export function deleteGood(params = {}) { //删除商品
    return request({
        url: 'api/admin/deleteGood',
        method: 'POST',
        data: params
    })
}

export function banGood(params = {}) { //禁用商品
    return request({
        url: 'api/admin/banGood',
        method: 'POST',
        data: params
    })
}

export function goodInfo(params = {}) { //商品详情
    return request({
        url: 'api/admin/goodInfo',
        method: 'POST',
        data: params
    })
}



export function addModifyGood(params = {}) { //添加或修改商品
    return request({
        url: 'api/admin/addModifyGood',
        method: 'POST',
        data: params
    })
}